# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年03月15日
"""
import openpyxl

myBook=openpyxl.load_workbook('学员表.xlsx')

mySheet1=myBook['Android学员表']
mySheet2=myBook['Java学员表']
mySheet3=myBook.copy_worksheet(mySheet1)

mySheet3.title='仅学一门课程的学员表'
while mySheet3.max_row >1:
	mySheet3.delete_rows(2)

mySet1=set(list(mySheet1.values)[1:])
mySet2=set(list(mySheet2.values)[1:])
mySet3=mySet1.symmetric_difference(mySet2)

for myRow in mySet3:
	mySheet3.append(myRow)

myBook.save('结果表-学员表.xlsx')